var ReservationsCanceLog = {
    id: "ReservationsCanceLogTable",
    seItem: null,
    table: null,
    layerIndex: -1
};
ReservationsCanceLog.initColumn = function () {
    return [
        {field: 'selectItem', radio: true},
        {title: '', field: 'id', visible: false, align: 'center', valign: 'middle', width: '50px'},
        {title: '取消人', field: 'deletePeople', align: 'center', valign: 'middle', sortable: true},
        {
            title: '取消时间', field: 'deleteTime', align: 'center', valign: 'middle', sortable: true,
            formatter: function (value, row, index) {
                return value.substring(0, 19);
            }
        },
        {title: '取消患者姓名', field: 'deleteCname', align: 'center', valign: 'middle', sortable: true},
        {title: '取消患者电话', field: 'deleteCphone', align: 'center', valign: 'middle', sortable: true},
        {title: '建档人', field: 'archiving', align: 'center', valign: 'middle', sortable: true},
        {
            title: '建档时间', field: 'filingTime', align: 'center', valign: 'middle', sortable: true,
            formatter: function (value, row, index) {
                return value.substring(0, 19);
            }
        },
    ];
};
ReservationsCanceLog.formParams = function () {
    var queryData = {};
    queryData['archiving'] = $("#archiving").val();
    queryData['startTime'] = $("#startTime").val();
    queryData['endTime'] = $("#endTime").val();
    return queryData;
}
ReservationsCanceLog.resetSearch = function () {
    $("#archiving").val("");
    $("#startTime").val("");
    $("#endTime").val("");
    ReservationsCanceLog.search();
};
ReservationsCanceLog.search = function () {
    ReservationsCanceLog.table.refresh({query: ReservationsCanceLog.formParams()});
};
$(function () {
    var defaultColunms = ReservationsCanceLog.initColumn();
    var table = new BSTable(ReservationsCanceLog.id, "/reservationsLog/canceList", defaultColunms);
    table.setPaginationType("server");
    table.setQueryParams(ReservationsCanceLog.formParams());
    ReservationsCanceLog.table = table.init();
    ReservationsCanceLog.table = table;
});